<link rel="stylesheet" type="text/css" href="../core/resource/css/coupon.css?v=2023">
<style>
.fui-tab {
	background: none;
}
</style>
<div ng-include="sys_html('common/_header')"></div>
<div class='fui-page  fui-page-current coupon-my-page'>
  <div class="jy2-headertopbg">
			<div class="fui-header" style="background:none">
				<div class="fui-header-left">
					<a class="back" style="color:#fff" href="javascript:" ng-click="goback()"></a>
				</div>
				<div class="title bold" style="font-size:1rem;color:#fff">我的优惠券</div>
				<div class="fui-header-right" style="padding-right:0.5rem;color:#fff">
						<i class="icon jinyunicon icon-liaotian" ng-click="access_json('jy_weishop/member.index/')" style="font-size: 1rem;"></i>
				</div>
			</div>
  </div>
  <div class='fui-content jy2-headertop'>
    <div class='fui-tab fui-tab-danger'>
      <a href="javascript:;" ng-click="pagedata.params.status=0;tool.get_list('jy_weishop/coupon.myindex/',true)" ng-class="{'active':pagedata.params.status==0}" data-cate=''>未使用</a>
      <a href="javascript:;" ng-click="pagedata.params.status=2;tool.get_list('jy_weishop/coupon.myindex/',true)" ng-class="{'active':pagedata.params.status==2}" data-cate=''>已锁定</a>
	  <a href="javascript:;" ng-click="pagedata.params.status=3;tool.get_list('jy_weishop/coupon.myindex/',true)" ng-class="{'active':pagedata.params.status==3}" data-cate=''>已过期</a>
	  <a href="javascript:;" ng-click="pagedata.params.status=1;tool.get_list('jy_weishop/coupon.myindex/',true)" ng-class="{'active':pagedata.params.status==1}">已使用</a>
	 </div>
	  <div ng-if="pagedata.list=='' || pagedata.list.length==0" class="fui-message fui-message-popup in content-empty" style=" margin-top: 0; padding-top: 0; position: relative; height: auto; background: none;">
		  <div class="icon ">
			<i class="icon icon-information"></i>
		  </div>
		  <div class="content">您还没有优惠券~</div>
		  <a ng-show="pagedata.setting.status2==1 && pagedata.list==''" class="btn btn-default-o external" style="display: block;border-radius:1rem;margin:0.5rem 2rem" href="javascript:;" ng-click="access_json('jy_weishop/coupon.index/main')">
			赶紧去领券中心看看更多优惠券~
		  </a>
	  </div>
    <div id="container" class="coupon-container coupon-list" ng-repeat="item in pagedata.list">
      <a href="javascript:;" ng-click="access_json('jy_weishop/coupon.mydetail/main/id='+item.id)" class="coupon-item  {{item.coupon.color}}">
        <div class="coupon-dots">
          <i>
          </i>
          <i>
          </i>
          <i>
          </i>
          <i>
          </i>
          <i>
          </i>
          <i>
          </i>
          <i>
          </i>
          <i>
          </i>
          <i>
          </i>
          <i>
          </i>
          <i>
          </i>
          <i>
          </i>
          <i>
          </i>
        </div>
        <div class="coupon-type" style="{{item.coupon.settagtitlecolor==1?'background:'+item.coupon.titlecolor:''}}">{{item.coupon.tagtitle}}</div>
        <div class="coupon-left" style="{{item.coupon.settagtitlecolor==1?'background:'+item.coupon.titlecolor:''}}">
          <div class="title">{{item.coupon.title3}}</div>
          <div class="subtitle">{{item.coupon.title2}}</div></div>
        <div class="coupon-right">
          <div class="title">{{item.coupon.title}}</div>
          <div class="subtitle">{{item.coupon.title5}}</div>
          <div ng-if="item.coupon.merchid!=0" class="subtitle">限购[{{item.coupon.merchname || '无'}}]店铺商品</div>
          <div class="usetime" style="line-height:1.4">
            <div class="text">
              <div ng-if="item.coupon.timelimittype==0">有效期: 永久有效</div>
              <div ng-if="item.coupon.past==1 && item.isuse!=1">有效期: <span ng-if="item.coupon.timelimittype!=0">{{item.coupon.time}}</span> 已过期</div>
              <div ng-if="item.coupon.past==0 && item.coupon.timelimittype!=0">有效期: {{item.coupon.title4}}</div></div>
            <div class="usebtn">
              <div class="disabled" ng-if="item.coupon.past==1 && item.isuse!=1">已过期</div>
              <div class="disabled" ng-if="item.isuse==1">已使用</div>
              <div ng-if="item.isuse!=1 && item.coupon.past!=1">立即使用</div></div>
          </div>
        </div>
      </a>
    </div>
  </div>
</div>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<div ng-include="sys_html('common/_coupon',true)"></div>
<script>
scope.tool.get_list('jy_weishop/coupon.myindex/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_weishop/coupon.myindex/');
}
</script>